package com.example.bledemo.net;

import android.util.Log;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Created by Peter_Z.
 * <p>
 * Date: 2025/8/6 0006
 */
public class CustomLogInterceptor implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = chain.request();
        Log.d("Request", "URL: " + request.url()
                + "\nHeaders: " + request.headers()
                + "\nBody: " + request.body());  // 解析请求体:ml-citation{ref="1,7" data="citationList"}
        return chain.proceed(request);
    }
}
